<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>rotate的方向</title>
        <style>
        *{
            padding: 0;
            margin: 0;
        }
            .box-200-200{
                width: 200px;
                height: 200px;
                background-color: #fc0;
                margin: 10px;
            }
            .rotate45{
                -webkit-transform: rotate(45deg);
                -ms-transform: rotate(45deg);
                -o-transform: rotate(45deg);
                transform: rotate(45deg);
            }
            .rotate-45{
                -webkit-transform: rotate(-45deg);
                -ms-transform: rotate(-45deg);
                -o-transform: rotate(-45deg);
                transform: rotate(-45deg);
            }
        </style>
    </head>
    <body>
        <div class="box-200-200"></div>
        <div class="box-200-200 rotate45">rotate(45deg)</div>
        <div class="box-200-200 rotate-45">rotate(-45deg)</div>
        <h2>结论</h2>
        <p>rotate的正方向是顺时针</p>
    </body>
</html>